/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package proyectoprogracuestionario;

import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BoxLayout;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;

/**
 *
 * @author D E L L
 */
public class Texto extends JPanel {
    
    private JPanel pnlPreguntaCmb,pnlPregunta,pnlPreguntaE,pnlSolu,pnlOK,pnl13,pnl11;
    private JTextField txtTituloP,txtayuda,txtSoluc,txtSE,txtmodif;
    private JLabel lblTituP,lblTextAyu,lblSolu,lblEliminar;
    private JButton btnAgregar,btnModificar,btnAceptar,btnEviarP,btnCancelaP;
    private String TipoPregunta;
    private JLabel lbltitulo,lblTextoayuda;
    private String Respuesta;
    
    
    public Texto(){
        this.setSize(800, 400);
        this.add(pnlPreguntaCmb= new JPanel());
        pnlPreguntaCmb.setBorder(new TitledBorder("Pregunta tipo Texto"));
        pnlPreguntaCmb.setLayout(new BoxLayout(pnlPreguntaCmb,BoxLayout.Y_AXIS ));
        
        JPanel pnl0, pnl1,pnl2,pnl12;
        pnlPreguntaCmb.add(pnlPregunta= new JPanel());
        pnlPregunta.add(pnl0= new JPanel());        
        pnl0.setLayout(new BoxLayout(pnl0, BoxLayout.Y_AXIS));
        //pnlPregunta.add(pnl1= new JPanel());
        pnl0.add(lbltitulo= new JLabel());
        lbltitulo.setVisible(false);
        pnl0.add(lblTituP= new JLabel("Titulo de la Pregunta"));
        pnl0.add(txtTituloP= new JTextField(50));
        //pnlPregunta.add(pnl2= new JPanel());
        pnl0.add(lblTextoayuda= new JLabel());
        lblTextoayuda.setVisible(false);
        pnl0.add(lblTextAyu= new JLabel(" Texto de Ayuda        "));
        pnl0.add(txtayuda= new JTextField(49));
       
        pnlPreguntaCmb.add(pnlSolu= new JPanel());
        pnlSolu.add(pnl11= new JPanel());
        pnl11.setLayout(new BoxLayout(pnl11, BoxLayout.Y_AXIS));
        pnl11.add(pnl12= new JPanel());
        pnl12.add(txtSoluc= new JTextField(20));
                
    }   
        public void vistaT(){
         lbltitulo.setText(txtTituloP.getText());
         lbltitulo.setVisible(true);
         lblTituP.setVisible(false);
         txtTituloP.setVisible(false);
         lblTextoayuda.setText(txtayuda.getText());
         lblTextoayuda.setVisible(true);
         lblTextAyu.setVisible(false);
         txtayuda.setVisible(false);
         Respuesta = txtSoluc.getText();
         txtSoluc.setText("");
         
         
            
        }
   
}